<?php
$this->beginWidget('bootstrap.widgets.TbBox', array(
	'title' => array($this->projectName => array('project/schema'), '热门搜索管理'),
	'headerIcon' => 'icon-tint',
));
$this->widget('bootstrap.widgets.TbButtonGroup', array(
	'type' => 'normal',
	'toggle' => 'radio',
	'buttons' => array(
		array('label' => $typeOptions['currnum'], 'url' => array($this->route, 'type' => 'currnum'), 'active' => $type === 'currnum'),
		array('label' => $typeOptions['lastnum'], 'url' => array($this->route, 'type' => 'lastnum'), 'active' => $type === 'lastnum'),
		array('label' => $typeOptions['total'], 'url' => array($this->route, 'type' => 'total'), 'active' => $type === 'total'),
	),
	'htmlOptions' => array('class' => 'row-top'),
));
$this->widget('bootstrap.widgets.TbGridView', array(
	'type' => 'striped bordered condensed',
	'dataProvider' => $gridDataProvider,
	'rowCssClassExpression' => '$data->isRemoved?"removed":""',
	'template' => "{items} {pager}",
	'columns' => array(
		array(
			'name' => 'body',
			'header' => '搜索词',
		),
		array(
			'name' => $type,
			'header' => $typeOptions[$type] . '次数',
		),
		array(
			'class' => 'bootstrap.widgets.TbButtonColumn',
			'template' => '{delete}',
			'deleteButtonUrl' => 'array("project/logDelete","body"=>$data->body)',
		),
	),
));
$this->endWidget();
